<?php 

if ( !empty($_POST)){
	include($_SERVER["DOCUMENT_ROOT"]."/bolsa_trabajo/dto/admon_dto.php");


    AdmonDTO::insert($_POST['nombres'], $_POST['apellidos'], $_POST['email'], $_POST['login'], $_POST['clave'], $_POST['estado']);
	header("Location: ../index.php");
 

}else{
	$msgError = null;
	$msgExito = null;
	$msgInfo = null;
}
?>




<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>--SITRABS-- Registro Empresarial</title>
<link rel="stylesheet" type="text/css" media="screen"
	href="../css/bootstrap3-datetimepicker.css" />
<script type="text/javascript" src="../lib/jquery-1.3.2.min.js"></script>
<script type="text/javascript" src="../lib/jquery.tools.js"></script>
<script type="text/javascript" src="../lib/jquery.custom.js"></script>
<script type="text/javascript" src="../lib/jquery.min.js"></script>

<link href="../css/styles.css" rel="stylesheet" type="text/css" />
<link href="../css/bootstrap.min3.css" rel="stylesheet">
<link href="../css/jumbotron.css" rel="stylesheet"/>
<link href="../css/bootstrap3.css" rel="stylesheet">
<script src="../js/bootstrap3-datepicker.js"></script>

<script type="text/javascript">
$(document).ready(function()
{
$("#departamento").change(function()
{
var id=$(this).val();
var dataString = 'idDepartamento='+ id;

$.ajax
({
type: "POST",
url: "../util/ajax_municipio.php",
data: dataString,
cache: false,
success: function(html)
{
$("#municipio").html(html);
} 
});

});

});
</script>

</head>

<body>
	<div class="container">
	<nav class="navbar navbar-default navbar-static">
        <div class="navbar-header">
            <button class="navbar-toggle" type="button" data-toggle="collapse" data-target="#b-menu-2">
                <span class="sr-only">Navegación</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
            <a class="navbar-brand">Registrar Administrador</a>
        </div>

        <!-- submenu elements for #b-menu-2 -->
        <div class="collapse navbar-collapse" id="b-menu-2">
          <ul class="nav navbar-nav">
   <li><a href="../index.php"><span class="glyphicon glyphicon-home"></span> Inicio</a></li>
            <li><a href="../help_us.html"><span class="glyphicon glyphicon-question-sign"></span> Ayuda</a></li>
            <li><a href="../about_us.html"><span class="glyphicon glyphicon-exclamation-sign"></span> Acerca de</a></li>
			<li><a href="../contact_us.html"><span class="glyphicon glyphicon-bullhorn"></span> Contáctanos</a></li>
           <li class="active"><a href="../logina.html"><span class="glyphicon glyphicon-pencil"></span> Registrando</a></li>
		   <li><a href="../login/login.php"><span class="glyphicon glyphicon-user"></span> Iniciar Sesión</a></li>
         
            <li class="dropdown">
             <ul class="dropdown-menu">
			 
   <li><a href="../index.php"><span class="glyphicon glyphicon-home"></span> Inicio</a></li>
            <li><a href="../help_us.html"><span class="glyphicon glyphicon-question-sign"></span> Ayuda</a></li>
            <li><a href="../about_us.html"><span class="glyphicon glyphicon-exclamation-sign"></span> Acerca de</a></li>
			<li><a href="../contact_us.html"><span class="glyphicon glyphicon-bullhorn"></span> Contáctanos</a></li>
           <li class="active"><a href="../logina.html"><span class="glyphicon glyphicon-pencil"></span> Registrando</a></li>
		   <li><a href="../login/login.php"><span class="glyphicon glyphicon-user"></span> Iniciar Sesión</a></li>
         
              </ul>
            </li>
          </ul> 
        </div><!-- /.nav-collapse -->
      </nav>

	<div class="container">

		
		
			<div>
				<?php 
		
					
				if($msgExito != null){
						echo "<div class='alert alert-success'> " . $msgExito ." </div>";
					}

					if($msgInfo != null){
						echo "<div class='alert alert alert-info'> " .$msgInfo ." </div>";
					}

					if($msgError != null){
						echo "<div class='alert alert-success'> " . $msgError ." </div>";
					}




					


					?>

			</div>

			<form class="form-horizontal" action="../action/action_register_basic_admon.php"
				method="post">
<input name="estado" type="hidden"
					value="ACTIVO" />
				<div>
					<div class="col-md-6">
						<label class="control-label">Nombres</label>
						<input name="nombres" type="text" class="form-control" placeholder="Nombres" required> 
					</div>
					<div class="col-md-6">
						<label class="control-label">Apellidos</label>
						<input name="apellidos" type="test" class="form-control" placeholder="Apellidos" required> 
					</div>	
				</div>
				<div>
					<div class="col-md-6">
						<label class="control-label">Login</label>
						<input name="login" type="text" class="form-control" placeholder="Login" required> 
					</div>
					<div class="col-md-6">
						<label class="control-label">Clave</label>
						<input name="clave" type="password" class="form-control" placeholder="Clave" required> 
					</div>	
				</div>
				<div>
					<div class="col-md-12">
						<label class="control-label">Email</label> 
						<input type="email"	 name="email" class="form-control"   placeholder="Direccion de correo" required>
					</div>					
			</div>
				

				<div>
					
<center>
						<a class="btn btn-default navbar-btn" href="../index.php">Regresar a Inicio</a>
						<button type="submit" class="btn btn-primary navbar-btn">Registrar</button>
					
</center>
				</div>
			</form>
		

	</div></div>
	<!-- /container --><script type="text/javascript" src="js/bootstrap.min.js"></script>
<script type="text/javascript" src="lib/jquery-1.3.2.min.js"></script>


 <script type="text/javascript" src="../js/bootstrap.min.js"></script> 
</body>
</html>
